﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimS7Study.Lib
{
    /// <summary>
    /// 写的数据参数模型
    /// </summary>
    public class WriteDataParameter
    {
        /// <summary>
        /// 存储区
        /// </summary>
        public Area Area { get; set; }

        /// <summary>
        /// 数据块编号
        /// </summary>
        public ushort DBNumber { get; set; } = 0;

        /// <summary>
        /// parameter的数据类型
        /// </summary>
        public ParameterType ParameterType { get; set; }

        /// <summary>
        /// 写入的个数
        /// </summary>
        public short WriteCount { get; set; } = 1;

        /// <summary>
        /// 起始地址(byte)
        /// </summary>
        public uint ByteAddress { get; set; }

        /// <summary>
        /// 起始地址(位)
        /// </summary>
        public byte BitAddress { get; set; }

        /// <summary>
        /// data的参数类型
        /// </summary>
        public DataType DataType { get; set; }

        /// <summary>
        /// 要写进去的字节数组
        /// </summary>
        public byte[] WriteBytes { get; set; }

    }
}
